import pandasai as pai

# Sample DataFrame
df = pai.DataFrame({
    "country":["United States","United Kingdom","France","Germany","Italy","Spain","Canada","Australia","Japan","China"],
    "revenue":[5000,3200,2900,4100,2300,2100,2500,2600,4500,7000]
})

# By default, unless you choose a different LLM, it will use BambooLLM.
# You can get your free API key signing up at https://app.pandabi.ai (you can also configure it in your .env file)
pai.api_key.set("PAI-be6eb08c-4633-4fb6-ba30-40bea04e122c")

df.chat('Which are the top 5 countries by sales?')

# df.chat('GDP 排名前五的国家是哪些?') 

df.chat(
    "Plot the histogram of countries showing for each one the gd. Use different colors for each bar",
)